Integrand size = 26, antiderivative size = 80 \[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \arcsin (x) \]
[Out]
Time = 0.10 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {867, 1649, 803, 667, 222} \[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=-g^2 \arcsin (x)+\frac {(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac {(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (x+1)}{\sqrt {1-x^2}} \]
[In]
[Out]
Rule 222
Rule 667
Rule 803
Rule 867
Rule 1649
Rubi steps \begin{align*} \text {integral}& = \int \frac {(1+x)^4 (f+g x)^2}{\left (1-x^2\right )^{7/2}} \, dx \\ & = \frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}-\frac {1}{5} \int \frac {(1+x)^3 \left (-f^2+8 f g+4 g^2+5 g^2 x\right )}{\left (1-x^2\right )^{5/2}} \, dx \\ & = \frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+g^2 \int \frac {(1+x)^2}{\left (1-x^2\right )^{3/2}} \, dx \\ & = \frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \int \frac {1}{\sqrt {1-x^2}} \, dx \\ & = \frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x) \\ \end{align*}
Time = 0.33 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.08 \[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=\frac {\sqrt {1-x^2} \left (f^2 \left (-4-3 x+x^2\right )-2 f g \left (-1+3 x+4 x^2\right )-3 g^2 \left (8-19 x+13 x^2\right )\right )}{15 (-1+x)^3}+2 g^2 \arctan \left (\frac {\sqrt {1-x^2}}{1+x}\right ) \]
[In]
[Out]
Time = 0.50 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.02
method | result | size |
risch | \(-\frac {\left (1+x \right ) \left (f^{2} x^{2}-8 x^{2} f g -39 g^{2} x^{2}-3 f^{2} x -6 f g x +57 g^{2} x -4 f^{2}+2 f g -24 g^{2}\right )}{15 \left (-1+x \right )^{2} \sqrt {-x^{2}+1}}-g^{2} \arcsin \left (x \right )\) | \(82\) |
trager | \(\frac {\left (f^{2} x^{2}-8 x^{2} f g -39 g^{2} x^{2}-3 f^{2} x -6 f g x +57 g^{2} x -4 f^{2}+2 f g -24 g^{2}\right ) \sqrt {-x^{2}+1}}{15 \left (-1+x \right )^{3}}+g^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{2}+1}+x \right )\) | \(102\) |
default | \(g^{2} \left (\frac {\left (-\left (-1+x \right )^{2}+2-2 x \right )^{\frac {3}{2}}}{\left (-1+x \right )^{2}}+\sqrt {-\left (-1+x \right )^{2}+2-2 x}-\arcsin \left (x \right )\right )+\frac {2 g \left (f +g \right ) \left (-\left (-1+x \right )^{2}+2-2 x \right )^{\frac {3}{2}}}{3 \left (-1+x \right )^{3}}+\left (f^{2}+2 f g +g^{2}\right ) \left (\frac {\left (-\left (-1+x \right )^{2}+2-2 x \right )^{\frac {3}{2}}}{5 \left (-1+x \right )^{4}}-\frac {\left (-\left (-1+x \right )^{2}+2-2 x \right )^{\frac {3}{2}}}{15 \left (-1+x \right )^{3}}\right )\) | \(125\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (70) = 140\).
Time = 0.32 (sec) , antiderivative size = 193, normalized size of antiderivative = 2.41 \[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=\frac {2 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{3} - 6 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} + 6 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x + 30 \, {\left (g^{2} x^{3} - 3 \, g^{2} x^{2} + 3 \, g^{2} x - g^{2}\right )} \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) + {\left ({\left (f^{2} - 8 \, f g - 39 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} - 3 \, {\left (f^{2} + 2 \, f g - 19 \, g^{2}\right )} x\right )} \sqrt {-x^{2} + 1}}{15 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} \]
[In]
[Out]
\[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=\int \frac {\sqrt {- \left (x - 1\right ) \left (x + 1\right )} \left (f + g x\right )^{2}}{\left (x - 1\right )^{4}}\, dx \]
[In]
[Out]
\[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=\int { \frac {{\left (g x + f\right )}^{2} \sqrt {-x^{2} + 1}}{{\left (x - 1\right )}^{4}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 266 vs. \(2 (70) = 140\).
Time = 0.29 (sec) , antiderivative size = 266, normalized size of antiderivative = 3.32 \[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=-g^{2} \arcsin \left (x\right ) + \frac {2 \, {\left (4 \, f^{2} - 2 \, f g + 24 \, g^{2} + \frac {5 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} - \frac {10 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} + \frac {105 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} + \frac {25 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {10 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {165 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {15 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} - \frac {30 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac {75 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac {15 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{4}}{x^{4}} + \frac {15 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{4}}{x^{4}}\right )}}{15 \, {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} + 1\right )}^{5}} \]
[In]
[Out]
Time = 0.07 (sec) , antiderivative size = 164, normalized size of antiderivative = 2.05 \[ \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx=\sqrt {1-x^2}\,\left (\frac {\frac {f^2}{3}+2\,f\,g+\frac {5\,g^2}{3}}{x-1}-\frac {\frac {f^2}{3}+2\,f\,g+\frac {5\,g^2}{3}}{{\left (x-1\right )}^2}\right )-\sqrt {1-x^2}\,\left (\frac {\frac {2\,f^2}{5}+\frac {4\,f\,g}{5}+\frac {2\,g^2}{5}}{{\left (x-1\right )}^3}+\frac {\frac {4\,f^2}{15}+\frac {8\,f\,g}{15}+\frac {4\,g^2}{15}}{x-1}-\frac {\frac {4\,f^2}{15}+\frac {8\,f\,g}{15}+\frac {4\,g^2}{15}}{{\left (x-1\right )}^2}\right )-g^2\,\mathrm {asin}\left (x\right )-\frac {\sqrt {1-x^2}\,\left (4\,g^2+2\,f\,g\right )}{x-1} \]
[In]
[Out]